The present disclosure relates generally to rendering images on an electronic display. The present disclosure more specifically relates to utilizing a shading module on a graphics processing unit (GPU) to composite 2-dimensional (2D) layers into a single, viewable image on the electronic display.
Many forms of consumer electronic devices may include an electronic display to convey visual information to a user. For example, a computer, smartphone, tablet computer, smart television, set-top box for a television, video game console, and other types of consumer electronic devices may provide display data to one or more electronic displays. Generating display data can be a computationally-intensive process for a device's central processing unit (CPU). For example, many video games utilize rasterized wireframe models to produce realistic images that appear 3-dimensional (3D) when viewed on a display.
Modern electronic devices may include a GPU to perform many of the computationally-intensive operations associated with generating display data. For example, a desktop computer may include a GPU on a peripheral video card. In another example, a smartphone may have a GPU integrated onto its motherboard. However, even with the ability to utilize a GPU to perform graphics calculations on certain devices, which calculations are performed and how the calculations are performed is often left to the computer programmer writing the application to decide.